package com.goal98.team.test.integration

import grails.test.*
import com.goal98.team.domain.Person

class PersonTests extends GroovyTestCase {
    protected void setUp() {
        super.setUp()
        grails.buildtestdata.TestDataConfigurationHolder.reset()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testSomething() {
        def player = Person.build()

        assert 'Player 1' == player.userRealName

        def playerFromDB = Person.findByUserRealName('Player 1')

        assert playerFromDB.userRealName == 'Player 1'

    }

    void testSomethingElse() {

        def playerFromDB = Person.findByUserRealName('Player 1')

        assert playerFromDB == null

    }
}
